<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户 - 等级积分规则')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-rules-edit" th:object="${cstUserIntegralRules}">
            <input name="id" th:field="*{id}" type="hidden">
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">应用ID：</label>
                <div class="col-sm-8">
                    <input name="areaId" th:field="*{areaId}" class="form-control" type="text" required>
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">行为编号：</label>
                <div class="col-sm-8">
                    <input name="eventCode" th:field="*{eventCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">行为描述：</label>
                <div class="col-sm-8">
                    <input name="eventNote" th:field="*{eventNote}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">每用户计分次数 0为不限：</label>
                <div class="col-sm-8">
                    <input name="openidLimit" th:field="*{openidLimit}" class="form-control" type="text" required>
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">是否按天计数：</label>
                <div class="col-sm-8">
                    <select name="dayLimit" class="form-control m-b" required>
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">积分累计类型：</label>
                <div class="col-sm-8">
                    <select name="grandType"   class="form-control m-b" th:field="*{grandType}" required>
                        <option value="0">行为积分</option>
                        <option value="1">评定积分</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产生计分值：</label>
                <div class="col-sm-8">
                    <input name="creditAmount" th:field="*{creditAmount}" class="form-control" type="text" required>
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">是否发布：</label>
                <div class="col-sm-8">
                    <select name="isPublish" class="form-control m-b" required>
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否删除：</label>
                <div class="col-sm-8">
                    <select name="isDelete" class="form-control m-b" required>
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建人：</label>
                <div class="col-sm-8">
                    <input name="createUser" th:field="*{createUser}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="createAt" th:value="${#dates.format(cstUserIntegralRules.createAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">最后修改人：</label>
                <div class="col-sm-8">
                    <input name="modifyUser" th:field="*{modifyUser}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">最后修改时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="modifyAt" th:value="${#dates.format(cstUserIntegralRules.modifyAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/rules";
        $("#form-rules-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-rules-edit').serialize());
            }
        }

        $("input[name='createAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='modifyAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        /*window.onload = function () {
            var a = $("#grandTypes").val();
            if (a == 0){
                document.getelmentbyid("#grandType").value="行为积分";
            }else if (a == 1){
                document.getelmentbyid("#grandType").value="评定积分";
            }
        }*/
    </script>
</body>
</html>